package com.wontube.smr.client;

import java.util.List;

import com.wontube.client.modle.vo.PagenateInfo;
import com.wontube.smr.client.model.po.Genre;
import com.wontube.smr.client.model.po.TVEpisode;
import com.wontube.smr.client.model.po.TVShow;
import com.wontube.smr.client.model.vo.EpisodeItems;
import com.wontube.smr.client.model.vo.TVShowItems;


/**
 * @author yuechao
 *
 */
public interface ITVHandler {
	/**
	 * all genres
	 * 
	 * @return
	 */
	List<Genre> selectAllGenres();
	
	/**
	 * Most popular tv from hulu
	 * 
	 * @param pageInfo
	 * @return
	 */
	TVShowItems selectPopularShows(PagenateInfo pageInfo);
	
	/**
	 * Most popular tv from hulu
	 *  
	 * @param genreName
	 * @param pageInfo
	 * @return
	 */
	TVShowItems selectPopularShows(String genreName, PagenateInfo pageInfo);
	
	/**
	 * search by name、actors or director
	 * 
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	TVShowItems searchTVShows(String query, PagenateInfo pageInfo);
	
	/**
	 * recent added show from hulu
	 * 
	 * @param pageInfo
	 * @return
	 */
	TVShowItems selectRecentShows(PagenateInfo pageInfo);
	
	/**
	 * recent added show from hulu
	 * 
	 * @param pageInfo
	 * @return
	 */
	TVShowItems selectRecentShows(String genreName, PagenateInfo pageInfo);
	
	/**
	 * get tv show by id
	 * 
	 * @param showId
	 * @return
	 */
	TVShow getTVShow(String showId);
	
	/**
	 * get all season by show id
	 * 
	 * @param showId
	 * @return
	 */
	List<Integer> getAllSeasons(String showId);
	
	/**
	 * get tv episodes by show id
	 * 
	 * @param showId
	 * @return
	 */
	List<TVEpisode> getEpisodeList(String showId, Integer seasonNum);
		
	/**
	 * get tv episode by id
	 * 
	 * @param episodeId
	 * @return
	 */
	TVEpisode getTVEpisode(String episodeId);
	
	/**
	 * Most popular episode
	 * 
	 * @param pageInfo
	 * @return
	 */
	EpisodeItems selectPopularEpisodes(PagenateInfo pageInfo);
	
	/**
	 * Most popular episode
	 * 
	 * @param pageInfo
	 * @return
	 */
	EpisodeItems selectPopularEpisodes(String genreName, PagenateInfo pageInfo);
	
	/**
	 * recently added episode
	 * 
	 * @param pageInfo
	 * @return
	 */
	EpisodeItems selectRecentEpisodes(PagenateInfo pageInfo);
	
	/**
	 * recently added episode
	 * 
	 * @param pageInfo
	 * @return
	 */
	EpisodeItems selectRecentEpisodes(String genreName, PagenateInfo pageInfo);
	
	/**
	 * search the episodes by name
	 * 
	 * @param query
	 * @param pageInfo
	 * @return
	 */
	EpisodeItems searchEpisodes(String query, PagenateInfo pageInfo);
	
	/**
	 * top rated tv shows
	 * @param pageInfo
	 * 
	 * @return
	 */
	TVShowItems selectTopRatedTVShows(PagenateInfo pageInfo);
	
	/**
	 * top rated tv shows
	 * @param pageInfo
	 * 
	 * @return
	 */
	TVShowItems selectTopRatedTVShows(String genreName, PagenateInfo pageInfo);	
	
	/**
	 * top rated episode
	 * @param pageInfo
	 *  
	 * @return
	 */
	EpisodeItems selectTopRatedEpisode(PagenateInfo pageInfo);
	
	/**
	 * top rated episode
	 * @param pageInfo
	 *  
	 * @return
	 */
	EpisodeItems selectTopRatedEpisode(String genreName, PagenateInfo pageInfo);		
}
